home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / usr / sybase / doc / dbaltlen.man < prev    next >
Text File  |  1993-04-22  |  3KB  |  89 lines

  1.  
  2.   1                       Version 4.0 -- 5/1/89                 dbaltlen
  3.   ______________________________________________________________________
  4.  
  5.   NAME:  dbaltlen
  6.  
  7.   FUNCTION:
  8.        Return the maximum length of the data for  a  particular  compute
  9.        column.
  10.  
  11.   SYNTAX:
  12.        DBINT dbaltlen(dbproc, computeid, column)
  13.  
  14.        DBPROCESS *dbproc;
  15.        int       computeid;
  16.        int       column;
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.   dbaltlen                Version 4.0 -- 5/1/89                        2
  25.   ______________________________________________________________________
  26.  
  27.   COMMENTS:
  28.  
  29.        o This routine returns the maximum length for a column in a  com-
  30.          pute  row.   In  the  case of variable length data, this is not
  31.          necessarily the actual length of the data, but rather the  max-
  32.          imum length. For the actual data length, use dbadlen().
  33.  
  34.          For example, given the SQL statement:
  35.  
  36.               select dept, name from employee
  37.                 order by dept, name
  38.                 compute count(name) by dept
  39.  
  40.          the call dbaltlen(dbproc, 1, 1) returns 4 because counts are of
  41.          SYBINT4 type, which is 4 bytes long.
  42.  
  43.  
  44.  
  45.  
  46.   3                       Version 4.0 -- 5/1/89                 dbaltlen
  47.   ______________________________________________________________________
  48.  
  49.   PARAMETERS:
  50.        dbproc -  A pointer to the DBPROCESS structure that provides  the
  51.            connection for a particular front-end/SQL Server process.  It
  52.            contains all the information that DB-Library uses  to  manage
  53.            communications and data between the front end and SQL Server.
  54.        computeid -  The id that identifies the particular compute row of
  55.            interest.   A  SQL SELECT statement may have multiple COMPUTE
  56.            clauses, each of which returns a separate compute  row.   The
  57.            computeid  corresponding  to  the  first  COMPUTE clause in a
  58.            SELECT is 1.  The computeid is  returned  by  dbnextrow()  or
  59.            dbgetrow().
  60.        column -  The number of the column of interest.  The first column
  61.            is number 1.
  62.  
  63.   RETURNS:
  64.        The maximum  length,  in  bytes,  possible  for  the  data  in  a
  65.  
  66.  
  67.  
  68.   dbaltlen                Version 4.0 -- 5/1/89                        4
  69.   ______________________________________________________________________
  70.        particular compute column.  -1 is returned if there  is  no  such
  71.        column or COMPUTE clause.
  72.  
  73.   SEE ALSO:
  74.        dbadata, dbadlen, dbalttype, dbgetrow, dbnextrow, dbnumalts
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.